package st.business.tepth.business.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author zhangyu
 * @date 2019/2/15
 * 零部件
 */
public class PartBean implements Parcelable {

    /**
     * material_no : null
     * val : 2
     * unit : null
     * repair_plan_id : 75
     * batch_no : null
     * parts_id : 35
     * id : 75
     * type : true
     * material_name : 刹车滚轮
     * model_no : null
     * head_img_url : null
     */

    private String material_no;
    private int val;
    private String unit;
    private int repair_plan_id;
    private String batch_no;
    private int parts_id;
    private int id;
    //1 零部件 2耗材
    private int type;
    private String material_name;
    private String model_no;
    private String head_img_url;
    private String brand;
    private String specifications;

    public String getSpecifications() {
        return specifications;
    }

    public void setSpecifications(String specifications) {
        this.specifications = specifications;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getMaterial_no() {
        return material_no;
    }

    public void setMaterial_no(String material_no) {
        this.material_no = material_no;
    }

    public int getVal() {
        return val;
    }

    public void setVal(int val) {
        this.val = val;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public int getRepair_plan_id() {
        return repair_plan_id;
    }

    public void setRepair_plan_id(int repair_plan_id) {
        this.repair_plan_id = repair_plan_id;
    }

    public String getBatch_no() {
        return batch_no;
    }

    public void setBatch_no(String batch_no) {
        this.batch_no = batch_no;
    }

    public int getParts_id() {
        return parts_id;
    }

    public void setParts_id(int parts_id) {
        this.parts_id = parts_id;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getMaterial_name() {
        return material_name;
    }

    public void setMaterial_name(String material_name) {
        this.material_name = material_name;
    }

    public String getModel_no() {
        return model_no;
    }

    public void setModel_no(String model_no) {
        this.model_no = model_no;
    }

    public String getHead_img_url() {
        return head_img_url;
    }

    public void setHead_img_url(String head_img_url) {
        this.head_img_url = head_img_url;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.material_no);
        dest.writeInt(this.val);
        dest.writeString(this.unit);
        dest.writeInt(this.repair_plan_id);
        dest.writeString(this.batch_no);
        dest.writeInt(this.parts_id);
        dest.writeInt(this.id);
        dest.writeInt(this.type);
        dest.writeString(this.material_name);
        dest.writeString(this.model_no);
        dest.writeString(this.head_img_url);
        dest.writeString(this.brand);
        dest.writeString(this.specifications);
    }

    public PartBean() {
    }

    protected PartBean(Parcel in) {
        this.material_no = in.readString();
        this.val = in.readInt();
        this.unit = in.readString();
        this.repair_plan_id = in.readInt();
        this.batch_no = in.readString();
        this.parts_id = in.readInt();
        this.id = in.readInt();
        this.type = in.readInt();
        this.material_name = in.readString();
        this.model_no = in.readString();
        this.head_img_url = in.readString();
        this.brand = in.readString();
        this.specifications = in.readString();
    }

    public static final Parcelable.Creator<PartBean> CREATOR = new Parcelable.Creator<PartBean>() {
        @Override
        public PartBean createFromParcel(Parcel source) {
            return new PartBean(source);
        }

        @Override
        public PartBean[] newArray(int size) {
            return new PartBean[size];
        }
    };
}
